package com.googlecode.maurersmarbles;

public class SinglePlay implements Play {

	/**
	 * The card to play.
	 */
	protected Card card;
	/**
	 * The player number.
	 */
	protected int player;
	/**
	 * The marble to play.
	 */
	protected int marble;
	/**
	 * The new space index of the marble after the play.
	 */
	protected int newIndex;
	
	/**
	 * Creates a new SinglePlay.
	 * @param card the card to play
	 * @param player the player number
	 * @param marble the marble to play
	 * @param newIndex the new space index of the marble after the play
	 */
	public SinglePlay(Card card, int player, int marble, int newIndex) {
		this.card = card;
		this.player = player;
		this.marble = marble;
		this.newIndex = newIndex;
	}
	
	@Override
	public String toString() {
		return "Card: " + (card != null ? card.getValue() : "null") + ", Player: " + player + ", Marble: " + marble + ", New Index: " + newIndex;
	}
	
}
